Conversation
| if(sense_ptr == nullptr) | ||
| sense_ptr = work_.sense; // Directly work with sense of workspace |
There was a problem hiding this comment.
Currently this should always be the case because sense is set to empty, when we call solve with inputs.
Does it mean that it should be a member of the class instead?
Or can we just always use work_.sense and delete sense?
There was a problem hiding this comment.
We should always be able to use work_.sense. Moreover, sense might be non empty if the update(...) + solve() method is used rather than just solve(...).
There was a problem hiding this comment.
What I mean is that in this case we can just assign sense to work_.sense and remove sense_ptr. The latter seems redundant.
There was a problem hiding this comment.
I think that this would not work in the case when the user calls DAQP::update with their own sense! I agree, however, that it would work if one would only call the solve with A,bu and bl, since sense is always set to null in that call.
There was a problem hiding this comment.
I thought we could do work_.sense = sense.data() similarly to what we do right now in the update.
Couldn't that work?
There was a problem hiding this comment.
work_.sense points to memory allocated internally by DAQP, so to avoid memory leaks it should not be altered.
There was a problem hiding this comment.
I see and it would then try to free stuff owned by the eigen variable.
Thanks for clarifying.
interfaces/daqp-eigen/daqp.cpp
Outdated
| if(true){ | ||
|
|
||
| } |
There was a problem hiding this comment.
WIP or leftover?
| void DAQP::set_warm_start() { | ||
| warm_start_ = true; | ||
| } | ||
|
|
||
| void DAQP::set_cold_start() { | ||
| warm_start_ = false; | ||
| } | ||
|
|
There was a problem hiding this comment.
If the behavior depends on sense, could it make sense (pun intended :D) to reset that if one wants to cold start, remove the flag and basically warm start as default?
To me, the user is probably interested in using the solver class because there are more related problems to solve. Therefore, warm starting should be the preferred option.
What do you think?
There was a problem hiding this comment.
With the most recent change it should make sense to warm start by default (although, as is always the case with warm starting, it might exacerbate the worst-case solution time if the new problem is not so similar to the previously solved)
There was a problem hiding this comment.
Basically, if we remove warm_start_ and in set_cold_start what we do is work_.sense = nullptr is this enough?
There was a problem hiding this comment.
Yes, that could work I think! I am still not fully convinced that warm starting should be the default though. It depends on if we want to improve the average or the worst-case behavior.
* Improve numerics in hdaqp for weakly active constraints. * Ensure constraints that cannot be activated are are mutable
No description provided.